<?php
/**
 * Add bookmark page
 *
 * @package ElggBookmarks
 */

$golf_score = elgg_get_golf_score(array(
		'golf_score_id' =>get_input('golf_score_id'),
		'active_flg' => 1,
	));
$golf_score = $golf_score[0];

gatekeeper();

elgg_set_context('owner');
elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());

$title = elgg_echo('golfscore:add');

$default = array (
		'title' => $title,
		'courses' => elgg_get_golf_course(),
		'score' => $golf_score
);
$body = "<div class='viewscore_dt'>";
$body .= elgg_view_form('golfscore/save', array(), $default);
$body .= "</div>";

$params = array(
		'content' => $body,
		'nav' => ''
);
$body = elgg_view_layout('one_column', $params);

echo elgg_view_page($title, $body);
return true;
